<?php
// +----------------------------------------------------------------------
// | 控制器 - WEB
// +----------------------------------------------------------------------
declare(strict_types=1);

namespace app\controller\web;

use app\BaseController;
use app\service\JwtTokenService;

/**
 * 首页
 *
 * Class Index
 * @package app\controller\web
 */
class Index extends BaseController
{
    public function index()
    {
        $token = JwtTokenService::issuingToken(['uid' => 1]);

        dump($token);
        dump(JwtTokenService::parseToken($token));
        trace($token);
        if (env('app_debug')) {
            return 'Trace调试已开启，请前往控制台查看';
        }
        return 'DEBUG模式已关闭';
    }

    public function hello($name = 'ThinkPHP8')
    {
        return 'hello,' . $name;
    }
}
